const pageProps = require('../tw-lib-base/page/props')

module.exports = {
  mouseenterTab: {
    type: Boolean,
    default: false,
    name: '开启鼠标移入切换标签',
    filedType: 'switch',
  },

  value: {
    type: String,
    default: '',
    name: '选中标签名称',
    filedType: 'value',
    dataSource: {
      from: 'navList',
      type: 'array',
      labelKey: 'label',
      valueKey: 'value'
    },
    vif: {
      key: 'mouseenterTab',
      value: true
    }
  },

  navList: {
    type: Array,
    default () {
      return [
        {
          name: '导航1',
          href: '/nav1',
          value: '1'
        },
        {
          name: '权限导航',
          href: '/role',
          roles: ['1000000002'],
          value: '2'
        },
        {
          name: '导航2',
          activeText: 'nav2',
          target: '_blank',
          value: '3'
        },
        {
          name: '导航3',
          value: '4',
          children: [
            {
              name: '子导航1',
              href: '/sub-nav1'
            },
            {
              name: '子导航2',
              href: '/sub-nav1',
              children: [
                {
                  name: '三级导航1',
                  href: '/lv3-1'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                }
              ]
            }
          ],
          activeText: 'nav2'
        }
      ]
    },
    name: '导航列表',
    nameTip: 'activeText:url路径中包含该文本则导航会标记为选中,value:开启鼠标移入切换标签必须写上',
    filedType: 'api'
  },

  ...pageProps,

  bgColor: {
    type: String,
    default: '#0d76f5',
    name: '背景颜色',
    filedType: 'color'
  },

  color: {
    type: String,
    default: '#ffffff',
    name: '文本颜色',
    filedType: 'color'
  },

  fontSize: {
    type: String,
    default: '12px',
    name: '文本大小',
    filedType: 'string'
  },

  activeColor: {
    type: String,
    default: '#ffffff',
    name: '选中导航文本颜色',
    filedType: 'color'
  },

  activeBgColor: {
    type: String,
    default: '#0fb3fa',
    name: '选中导航背景色',
    filedType: 'color'
  },

  dropBgColor: {
    type: String,
    default: '#0d76f5',
    name: '导航中下拉选项选中背景',
    filedType: 'color'
  },

  dropText: {
    type: String,
    default: '#333',
    name: '导航中下拉选项字体颜色',
    filedType: 'color'
  },

  dropBoxColor: {
    type: String,
    default: '#ffffff',
    name: '导航中下拉背景颜色',
    filedType: 'color'
  },

  arrowColor: {
    type: String,
    default: '#333',
    name: '导航中下拉小箭头颜色',
    filedType: 'color'
  },

  exhibition: {
    type: Boolean,
    default: false,
    name: '大屏阴影效果',
    filedType: 'switch'
  },

  navPadding: {
    type: String,
    default: '0 30px',
    name: '导航边距设置',
    filedType: 'string'
  },

  exhstyle: {
    type: Array,
    default: 'Glow',
    name: '大屏阴影效果',
    filedType: 'select',
    options: [
      {
        name: '效果1',
        value: 'Glow'
      },
      {
        name: '效果2',
        value: 'Glow1'
      }
    ],
    vif: {
      key: 'exhibition',
      value: true
    }
  },

  clickNavHandler: {
    type: Function,
    name: '点击导航回调函数',
    placeholder: 'function clickNavHandler (nav, navs){\n  \n}',
    nameTip: '回调函数的第一个参数nav为当前导航，每二个参数navs为导航列表;返回false时，会取消跳转',
    filedType: 'function'
  }
}
